package com.markus.basic.设计模式.动态代理模式.jdk动态代理;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * Author:markusZhang
 * Date:Create in 2020/8/30 14:42
 * todo:
 */
public class MyInvocationHandler implements InvocationHandler {

    private Object instance;

    public MyInvocationHandler(Object instance){
        this.instance = instance;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Object invoke = method.invoke(instance,args);
        return invoke;
    }
}
